package com.mlx.mylogin.base;

public class LoginException extends RuntimeException{

    private Integer code;

    public LoginException(int code, String message, Object... objects) {
        super(String.format(message, objects));
        this.code = code;
    }

    public LoginException(String message, Object... objects) {
        super(String.format(message, objects));
        this.code = 401;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
